<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link rel="stylesheet" href="./animate.css">
  <style>
    
    .box{
      width: 150px;
      height: 150px;
      background-color: purple;
      margin: 50px auto;
    }
    .fade-enter-active{
      animation: rotateInDownLeft 1s;
    }
    .fade-leave-active{
      animation: rotateOutDownLeft 1s;
    }
  </style>
</head>
<body>
  <div id="app">
    <button @click="show"> {{ isShow?'消失':'显示' }} </button>
    <transition name="fade">
      <div class="box" v-if="isShow"></div>
      
    </transition>
  </div>
  <script src="./vue.js"></script>
  <script>
    const vm = new Vue({
      el: '#app',
      data: {
        isShow: false
      },
      methods: {
        show(){
          this.isShow = !this.isShow;
        }
      }
    })
  </script>
</body>
</html>